import wx
class MyFrame(wx.Frame):
    def __init__(self, parent, title):
        wx.Frame.__init__(self, parent, title=title, size=(400,200))
        self.control=wx.TextCtrl(self, style=wx.TE_MULTILINE)
        self.CreateStatusBar()

        #create the menu
        filemenu = wx.Menu()

        #wx.ID_ABOUT & wx.ID_EXIT are the standard id of wxWidgets
        menuAbout = filemenu.Append(wx.ID_ABOUT, "&About", " Information about this program")
        filemenu.AppendSeparator()
        menuExit =filemenu.Append(wx.ID_EXIT, "E&xit", "Exit the program")
        
        #create the menu bar
        menuBar = wx.MenuBar()
        menuBar.Append(filemenu, "&File")
        self.SetMenuBar(menuBar)

        self.Bind(wx.EVT_MENU, self.OnAbout, menuAbout)
        self.Bind(wx.EVT_MENU, self.OnExit, menuExit)
        self.Show(True)

    def OnAbout(self, event):
        dlg = wx.MessageDialog(self, "A small text editor", "About the sample Editor", wx.OK)
        dlg.ShowModal()
        dlg.Destroy()

    def OnExit(self, event):
        self.Close(True)
        


app = wx.App(False)
frame = MyFrame(None, "Small editor")
app.MainLoop()
